export default (tags: Array<string>) => {
  const tagData: Map<string, { type: "" | "success" | "info" | "warning" | "danger"; }> = new Map();
  const types: Array<"" | "success" | "info" | "warning" | "danger"> = [
    "",
    "success",
    "info",
    "warning",
    "danger",
  ];
  let typeIndex: number = 0;
  for (const value of tags) {
    tagData.set(value, { type: types[typeIndex] })
    typeIndex++;
    if (typeIndex === 5) typeIndex = 0;
  }

  return tagData
}